#!/usr/bin/env bash

set -ve

export LFS='/mnt/lfs'

_USER=`whoami`
if [ "$_USER" != "lfs" ];
then
    echo 'WARNING: User lfs ONLY!!!' && exit;
fi

################################ Bash ###############################

cd $LFS/sources/
tar -xvf bash-5.0.tar.gz
cd bash-5.0/

./configure --prefix=/tools --without-bash-malloc
make
make test
make install
ln -sv bash /tools/bin/sh
